pp108 : Adding Standard Methods to a WS-AppServer Model

Adding Standard Methods to a WS-AppServer Model

This topic describes the procedure to add standard methods to a WS-AppServer model.

When you import tables from the database (add classes), depending upon the tables selected, the attributes and standard methods are automatically generated. However, you can further add standard methods based on the data model that you want to create.

  1. Double-click the <WS-AppServer Package> from either of the following locations:
    • Workspace Documents (My Recent Documents) window.
    • Workspace Documents (Explorer) > <solution> > <project>. The WS-AppServer Package window appears, displaying the data models and their corresponding attributes, methods, and relations.
  2. In the Models group box, right-click a model and select Add > Standard Methods. The Add Standard Methods to Class dialog box appears.
  3. From the Select Attribute table, select the attributes for which you want to generate the standard methods. If you want to select all the attributes in the table, select the check box next to the table header.
  4. In the Object name used in the method field, provide a name for the object. The name you provide here is used by WS-AppServer to generate the methods. It is mandatory.
  5. Select the Do the selected attribute(s) uniquely identify an object? check box only if the selected attributes form a unique record and do not have duplication.
  6. Click OK.

The following four standard methods are generated and added to the Methods group box:

  • get<objectname>Object
    Note: The get<objectname>Object method is generated only if you have identified the attributes as unique (refer step 5). The variable <objectname> refers to the name that you provided (refer step 4).
  • get<objectname>Objects
  • getPrevious<objectname>Objects
  • getNext<objectname>Objects

Related tasks

Adding an Attribute to a WS-AppServer Model
Adding Custom Methods to a WS-AppServer Model
Adding a Parameter to a Method
Creating or Updating Web Service Interface on WS-AppServer Models

Related reference

Method Properties Interface